package org.example.test;

import java.io.File;

public class CreateIO {
    public static void main(String[] args) throws Exception
    {
        String s="D:\\IDEAFiles\\java-luntan\\src\\main\\resources\\sss\\www.txt";
        String s1=s.substring(s.lastIndexOf("\\")+1);
        String s2=s.substring(0,s.lastIndexOf("\\"));
        System.out.println(s2);
        System.out.println(s1);
        File file = new File(s);
        if(!file.getParentFile().exists()){
            file.getParentFile().mkdirs();
        }
//        File out = new File(s2,s1);
//        System.out.println(out.toString());
        if(!file.exists()){
            file.createNewFile();
        }

    }
}
